package demo_designPattern.proxy.dynamicProxy;

import java.lang.reflect.Proxy;


public class Client {
    public static void main(String[] args) throws Throwable {
	DataCollector collector = new DataCollector();
	Collecter collectorProxy = (Collecter)Proxy.newProxyInstance(DataCollector.class.getClassLoader(), new Class[]{Collecter.class}, new Handler(collector));
//	System.out.println(collectorProxy.getClass());
	System.out.println(collectorProxy.outputData("Hello World"));
//	collectorProxy.collect();
    }
}
